package com.jihox.abookpro.fragment;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.Activity;
import android.app.Fragment;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

import com.jihox.abookpro.LoginActivity;
import com.jihox.abookpro.MyApplication;
import com.jihox.abookpro.R;
import com.jihox.abookpro.adapter.OrdersListAdapter;
import com.jihox.abookpro.domain.OrderListItem;
import com.jihox.abookpro.domain.OrderListItem.Logisticvo;
import com.jihox.abookpro.domain.OrderListItem.OrderItem;
import com.jihox.abookpro.domain.OrderListItem.ShippingTypeVo;
import com.jihox.abookpro.helper.UserHelper;
import com.jihox.abookpro.uploader.OnProgressListener;
import com.jihox.abookpro.uploader.UploadService;
import com.jihox.abookpro.util.ConfigProperties;
import com.jihox.abookpro.view.JHProgressDialog;

public class NoAccountFragment extends Fragment {
	

	private static final String HOMEFRAGMENT = "homefragment";
	private static final int REGISTCODE = 1234321;
	private static final int HOME_CODE = 1235321;
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.activity_no_account, container,
				false);
		return view;
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		Button goLogin = (Button) getActivity().findViewById(R.id.btn_gologin);
		goLogin.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {

				Intent intent = new Intent(getActivity(), LoginActivity.class);
				intent.putExtra("comefrom", HOMEFRAGMENT);
				getActivity().startActivityForResult(intent, HOME_CODE);
			}
		});
		
	}
	
}
